package com.vanvalt.payhui.modules.pay.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.service.CrudService;
import com.vanvalt.core.utils.SvrUtils;
import com.vanvalt.payhui.modules.pay.dao.ProfitDataDao;
import com.vanvalt.payhui.modules.pay.entity.ProfitData;

/**
 * @author Xiaoyang
 *
 */
@Service
@Transactional(readOnly = true)
public class ProfitDataService extends CrudService<ProfitDataDao, ProfitData> {

	@Autowired
	public ProfitDataDao profitDataDao;
	
	@Transactional(readOnly = false)
	public void save(ProfitData profitData) {
		
		SvrUtils.save(profitData, profitDataDao);
	}
	
	public List<String> getYearList(Map<String,Object> map){
		
		List<String> list = profitDataDao.findYearList(map);
		
		return list;
	}
	
	public List<String> getMonthListByYear(Map<String,Object> map){
		
		List<String> list = profitDataDao.findMonthListByYear(map);
		
		return list;
	}
	
	public List<String> getYearMonthList(Map<String,Object> map){
		
		List<String> list = profitDataDao.findYearMonthList(map);
		
		return list;
	}
	
}
